package com.meida.boot.handler.company;

import com.meida.common.enums.AuthStatusEnum;
import com.meida.common.mybatis.entity.EntityMap;
import com.meida.common.mybatis.interceptor.PageInterceptor;
import com.meida.common.mybatis.model.PageParams;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.module.system.client.entity.SysCompany;
import org.springframework.stereotype.Component;

/**
 * 企业列表
 * @author zyf
 */
@Component("companyListHandler")
public class CompanyListHandler implements PageInterceptor {

    @Override
    public void prepare(CriteriaQuery cq, PageParams pageParams, EntityMap params) {
        params.put("colleconTag", true);
        cq.eq(SysCompany.class, "auditState", AuthStatusEnum.AUTHSUCCESS);
    }
}
